package com.wangshouyu.mp.user.tag;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author 王守钰
 * @date 2020年12月23日 14:53
 * @description 标签
 */
public class TagInfo implements Serializable {

    /**
     * 标签id
     */
    private Long id;

    /**
     * 标签名称
     */
    private String name;

    /**
     * 粉丝数
     */
    private Long count;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getCount() {
        return count;
    }

    public void setCount(Long count) {
        this.count = count;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        TagInfo tagInfo = (TagInfo) o;
        return Objects.equals(id, tagInfo.id) && Objects.equals(name, tagInfo.name) && Objects.equals(count, tagInfo.count);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), id, name, count);
    }

    @Override
    public String toString() {
        return "TagInfo{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", count=" + count +
                '}';
    }

    public TagInfo(Long id, String name) {
        this.id = id;
        this.name = name;
    }

    public TagInfo(String name) {
        this.name = name;
    }

    public TagInfo(Long id) {
        this.id = id;
    }

    public TagInfo() {
    }
}
